package Eyjafjalla.card.skill;

import Eyjafjalla.action.PinkOceanAction;
import Eyjafjalla.action.TimeGoneAction;
import Eyjafjalla.card.AbstractEyjafjallaCard;
import Eyjafjalla.modcore.EyjafjallaTag;
import com.badlogic.gdx.graphics.Color;
import com.megacrit.cardcrawl.actions.animations.VFXAction;
import com.megacrit.cardcrawl.actions.unique.RemoveDebuffsAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.vfx.BorderFlashEffect;
import com.megacrit.cardcrawl.vfx.combat.TimeWarpTurnEndEffect;
import com.megacrit.cardcrawl.vfx.combat.WhirlwindEffect;

public class TimeOfLove_Eyjafjalla extends AbstractEyjafjallaCard {
    public static final String ID = "TimeOfLove_Eyjafjalla";
    private static final CardStrings cardStrings;

    public TimeOfLove_Eyjafjalla(){
        super(ID, cardStrings.NAME,2,cardStrings.DESCRIPTION,CardType.SKILL,CardRarity.RARE,CardTarget.NONE);
        this.exhaust = true;
        this.tags.add(EyjafjallaTag.INNATE_EYJAFJALLA);
        setFireDescription(cardStrings.EXTENDED_DESCRIPTION[0]);
    }

    @Override
    public AbstractCard makeCopy() {
        return new TimeOfLove_Eyjafjalla();
    }

    @Override
    public void use(AbstractPlayer p, AbstractMonster m) {
        addToBot(new VFXAction(new WhirlwindEffect(new Color(1.0F, 0.9F, 0.4F, 1.0F), true)));
        addToBot(new VFXAction(new BorderFlashEffect(Color.RED, true)));
        addToBot(new VFXAction(null,new TimeWarpTurnEndEffect(),0F,true));
        addToBot(new TimeGoneAction());
        if(isFire()){
            addToBot(new RemoveDebuffsAction(p));
        }
    }

    @Override
    public void upgrade() {
        if(!this.upgraded){
            upgradeName();
            upgradeBaseCost(1);
        }
    }

    static {
        cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
    }
}


